UPDATE
cscart_lock_keys
SET
expiry_at = UNIX_TIMESTAMP(NOW()) + 30,
token = 'Gb4AN1/bDbymid7GnyZt0jJaFOPgfKcf8gD2YOV6BKM='
WHERE
key_id = 'cdbb19becde490de2a52c5d96c3185f1301e9f29db4d6e5bc44bfdff0d261318'
AND (
token = 'Gb4AN1/bDbymid7GnyZt0jJaFOPgfKcf8gD2YOV6BKM='
OR expiry_at <= UNIX_TIMESTAMP(NOW())
)