UPDATE
cscart_lock_keys
SET
expiry_at = UNIX_TIMESTAMP(NOW()) + 30,
token = 'wxr75ybhmlno90KwrWSRT5PCRUTe9hVxiZ7gb9rhGJY='
WHERE
key_id = '49983146a3408b96d68b7b1db6375c409a151e0fc83b4d14c5e359394e44cc30'
AND (
token = 'wxr75ybhmlno90KwrWSRT5PCRUTe9hVxiZ7gb9rhGJY='
OR expiry_at <= UNIX_TIMESTAMP(NOW())
)