UPDATE
cscart_lock_keys
SET
expiry_at = UNIX_TIMESTAMP(NOW()) + 30,
token = 'jMleCAzJamZzQdrxxaD19TbVOiZJwQWKZ/khp4ttXpQ='
WHERE
key_id = '545ddbc88a4a6f03f07825c2cbf8c5df2051b2999cfbc9eddb8862121b0ab102'
AND (
token = 'jMleCAzJamZzQdrxxaD19TbVOiZJwQWKZ/khp4ttXpQ='
OR expiry_at <= UNIX_TIMESTAMP(NOW())
)