UPDATE
cscart_lock_keys
SET
expiry_at = UNIX_TIMESTAMP(NOW()) + 30,
token = 'GeCdTfc6/PIDy0uaZg9ubSCNkJj/Qm+dORaoejHFeVc='
WHERE
key_id = '925676ce9fbf0e4e6fbfd477d66507024a8443290d5a00f46b7a39eb98b181de'
AND (
token = 'GeCdTfc6/PIDy0uaZg9ubSCNkJj/Qm+dORaoejHFeVc='
OR expiry_at <= UNIX_TIMESTAMP(NOW())
)