UPDATE
cscart_lock_keys
SET
expiry_at = UNIX_TIMESTAMP(NOW()) + 30,
token = 'iStnuo9vkUcSKdjmOWLzkNUgMrJ3UHGIvsaEWe/Mdmk='
WHERE
key_id = '1be96632baec90b016a8a7d3825151dd965a8922d786f55f8ee9afce8eacdc24'
AND (
token = 'iStnuo9vkUcSKdjmOWLzkNUgMrJ3UHGIvsaEWe/Mdmk='
OR expiry_at <= UNIX_TIMESTAMP(NOW())
)