UPDATE
cscart_lock_keys
SET
expiry_at = UNIX_TIMESTAMP(NOW()) + 30,
token = 'kMqfJkD+zw3yU4fLVfpogMkWuMwpz/Cm7jzq5TVbsEc='
WHERE
key_id = 'c011e0e1d8412af0fe5dce9c771b5c2ef1cc4f811d39eae2f5fb453d38dfb5f1'
AND (
token = 'kMqfJkD+zw3yU4fLVfpogMkWuMwpz/Cm7jzq5TVbsEc='
OR expiry_at <= UNIX_TIMESTAMP(NOW())
)