UPDATE
cscart_lock_keys
SET
expiry_at = UNIX_TIMESTAMP(NOW()) + 30,
token = 'U/3U+5RFVLAGGO4Hy1pOgFmPo1BqjQbpGq6QWf1rs4g='
WHERE
key_id = '605f0ece05cc55600366446fde8534a1706acefdc510cdf298f3db6dc8b2dcf2'
AND (
token = 'U/3U+5RFVLAGGO4Hy1pOgFmPo1BqjQbpGq6QWf1rs4g='
OR expiry_at <= UNIX_TIMESTAMP(NOW())
)