UPDATE
cscart_lock_keys
SET
expiry_at = UNIX_TIMESTAMP(NOW()) + 30,
token = 'L3Wk3zP5ER6+KyuqkLcRtlvTtoj/L1LwE080h8/DdKk='
WHERE
key_id = '6c1710644870290adfd4d35688c44bfe01c310ef8ffbce14cc9cd2aadfe727da'
AND (
token = 'L3Wk3zP5ER6+KyuqkLcRtlvTtoj/L1LwE080h8/DdKk='
OR expiry_at <= UNIX_TIMESTAMP(NOW())
)