UPDATE
cscart_lock_keys
SET
expiry_at = UNIX_TIMESTAMP(NOW()) + 30,
token = 'OU8lGzTz3puj3PN5B4Ov4lIpXKmuHRLVq+POLBwMu4g='
WHERE
key_id = '43b6222c7ae198a29b6a4af716ed0ec1528863db19f43b1d856e5e1005d23312'
AND (
token = 'OU8lGzTz3puj3PN5B4Ov4lIpXKmuHRLVq+POLBwMu4g='
OR expiry_at <= UNIX_TIMESTAMP(NOW())
)