UPDATE
cscart_lock_keys
SET
expiry_at = UNIX_TIMESTAMP(NOW()) + 30,
token = 'FQJsW865gF4WZ4pBwrWO6GDeC4OMq/oSrCGaTK45YsY='
WHERE
key_id = 'fd8a3efa2ea7eceb5e27277eed7dfc4d2103dd37980390d519fddba25c049538'
AND (
token = 'FQJsW865gF4WZ4pBwrWO6GDeC4OMq/oSrCGaTK45YsY='
OR expiry_at <= UNIX_TIMESTAMP(NOW())
)