UPDATE
cscart_lock_keys
SET
expiry_at = UNIX_TIMESTAMP(NOW()) + 30,
token = '1DsRENN/pQ8jQbuIlgfq4sfMhZnqf1t/kM6XxpqkYhE='
WHERE
key_id = '2ca085147f06c11aa23f8ebfb6046fc2ffb2c1e34a567634ce5e0c320ccb60c6'
AND (
token = '1DsRENN/pQ8jQbuIlgfq4sfMhZnqf1t/kM6XxpqkYhE='
OR expiry_at <= UNIX_TIMESTAMP(NOW())
)