UPDATE
cscart_lock_keys
SET
expiry_at = UNIX_TIMESTAMP(NOW()) + 30,
token = 'fAHLjg/l4cjjpIzzPzs7D2Yl4+bA/tc0rjVlsbdYxLo='
WHERE
key_id = '0219ab49fbcadaec05e263fb2de7241d4c30db00aa5940306b63a1cdbe96fdb3'
AND (
token = 'fAHLjg/l4cjjpIzzPzs7D2Yl4+bA/tc0rjVlsbdYxLo='
OR expiry_at <= UNIX_TIMESTAMP(NOW())
)