UPDATE
cscart_lock_keys
SET
expiry_at = UNIX_TIMESTAMP(NOW()) + 30,
token = '+hMEx+kVC7eEgNfJFyGspHgrxVsTQGY6aXHuwVpw/7M='
WHERE
key_id = '86b68d53592120dcffc0b09d71a2e5de29ba1b63643259cc5ee7ba10f432d2f5'
AND (
token = '+hMEx+kVC7eEgNfJFyGspHgrxVsTQGY6aXHuwVpw/7M='
OR expiry_at <= UNIX_TIMESTAMP(NOW())
)