UPDATE
cscart_lock_keys
SET
expiry_at = UNIX_TIMESTAMP(NOW()) + 30,
token = 'A5GAKlBFKYr8IEsl9rqTYIHP/yolkiZF1BCh2oyUSww='
WHERE
key_id = 'ce734e084847f9926d75759fb5e4f95205731b90757017d0dc807953463fe96b'
AND (
token = 'A5GAKlBFKYr8IEsl9rqTYIHP/yolkiZF1BCh2oyUSww='
OR expiry_at <= UNIX_TIMESTAMP(NOW())
)