UPDATE
cscart_lock_keys
SET
expiry_at = UNIX_TIMESTAMP(NOW()) + 30,
token = 'B6AIMXxZLcaXEKrz/BbDx/tky0lw0SJkcvxWfYSvcwI='
WHERE
key_id = '3bbfeb59b0fe79acd3cebbff16c34a886c74e12417d3e4dd536a614331c82e71'
AND (
token = 'B6AIMXxZLcaXEKrz/BbDx/tky0lw0SJkcvxWfYSvcwI='
OR expiry_at <= UNIX_TIMESTAMP(NOW())
)