UPDATE
cscart_lock_keys
SET
expiry_at = UNIX_TIMESTAMP(NOW()) + 30,
token = 'kdb1B+XupRjvSi+EpjoafkByfV6c3olyMZlLCGli4jw='
WHERE
key_id = '92dff2f246fb0e47904693e5dc3ea18deb0eb9ddd19558a07b9f5c7f3b1de236'
AND (
token = 'kdb1B+XupRjvSi+EpjoafkByfV6c3olyMZlLCGli4jw='
OR expiry_at <= UNIX_TIMESTAMP(NOW())
)