UPDATE
cscart_lock_keys
SET
expiry_at = UNIX_TIMESTAMP(NOW()) + 30,
token = '83iz9280A5tAxyydVLKppLJAz/0/Y3vZFLYP9vCP1H4='
WHERE
key_id = '0e3e1ff1bfde180558e023ffcd0e8bb8467d6230ef0e8b33e7fcf01755f07480'
AND (
token = '83iz9280A5tAxyydVLKppLJAz/0/Y3vZFLYP9vCP1H4='
OR expiry_at <= UNIX_TIMESTAMP(NOW())
)