UPDATE
cscart_lock_keys
SET
expiry_at = UNIX_TIMESTAMP(NOW()) + 30,
token = 'pbZ19UHk/ceqt0SBy3MRLmYPwUdLj+T9dCpVqSqBz9c='
WHERE
key_id = '43ab95f3f2ef8d6727d05c9766e4b739a9dc34df7bdb0711b08db4000c2d573a'
AND (
token = 'pbZ19UHk/ceqt0SBy3MRLmYPwUdLj+T9dCpVqSqBz9c='
OR expiry_at <= UNIX_TIMESTAMP(NOW())
)