UPDATE
cscart_lock_keys
SET
expiry_at = UNIX_TIMESTAMP(NOW()) + 30,
token = 'JbxOTvYM4UyP/8z1vJ0mOOpH14/UmW3TuFz1LWxWilI='
WHERE
key_id = '276b856d7529a93782deeacb939c1528887c6a35708c9f6981d81481fc9dce62'
AND (
token = 'JbxOTvYM4UyP/8z1vJ0mOOpH14/UmW3TuFz1LWxWilI='
OR expiry_at <= UNIX_TIMESTAMP(NOW())
)