UPDATE
cscart_lock_keys
SET
expiry_at = UNIX_TIMESTAMP(NOW()) + 30,
token = 'g20uZqE5oofzDlAsweXYgxKueA2BErQ1ysa/Bw5LwXc='
WHERE
key_id = 'ae86b18fdc56e75a9b1034cd4092062e318d03d0b6377b0bb3d7468fe7017a82'
AND (
token = 'g20uZqE5oofzDlAsweXYgxKueA2BErQ1ysa/Bw5LwXc='
OR expiry_at <= UNIX_TIMESTAMP(NOW())
)