UPDATE
cscart_lock_keys
SET
expiry_at = UNIX_TIMESTAMP(NOW()) + 30,
token = 'a4plQq5kZsv+sSj21w4/YioUfjqdcDUJcQ9mFzSIWR4='
WHERE
key_id = '358bcdd32df8d2655490f4707da8f4a1a2f23d5c0eadc19753344e70eb9794e0'
AND (
token = 'a4plQq5kZsv+sSj21w4/YioUfjqdcDUJcQ9mFzSIWR4='
OR expiry_at <= UNIX_TIMESTAMP(NOW())
)