UPDATE
cscart_lock_keys
SET
expiry_at = UNIX_TIMESTAMP(NOW()) + 30,
token = '/JL4cnXzQ4tzcjdPDFkvg0MMlA9mTsN/MfxVUy5m938='
WHERE
key_id = '1bcfc052a83ffca61e1d685497f33ff569d883116ce9dcca634e9eeaaa4cc79b'
AND (
token = '/JL4cnXzQ4tzcjdPDFkvg0MMlA9mTsN/MfxVUy5m938='
OR expiry_at <= UNIX_TIMESTAMP(NOW())
)