UPDATE
cscart_lock_keys
SET
expiry_at = UNIX_TIMESTAMP(NOW()) + 30,
token = 'cp5/Onfj/waUvlR/mepgacMMSuxX9qHX1r3Y0OJWmxM='
WHERE
key_id = '3b6da24e959c620487332d73da967320f355b38a5c0db5ebb8dc7fae3cd77590'
AND (
token = 'cp5/Onfj/waUvlR/mepgacMMSuxX9qHX1r3Y0OJWmxM='
OR expiry_at <= UNIX_TIMESTAMP(NOW())
)