UPDATE
cscart_lock_keys
SET
expiry_at = UNIX_TIMESTAMP(NOW()) + 30,
token = 'Ig6+PFGq+11VhHQJKbZbjCZZ0VTQ5fYiVCSkkkOztBg='
WHERE
key_id = '44c74c807dbb2a1eb552d5f7189210a28b194d586c1014a2125026a4903ac36f'
AND (
token = 'Ig6+PFGq+11VhHQJKbZbjCZZ0VTQ5fYiVCSkkkOztBg='
OR expiry_at <= UNIX_TIMESTAMP(NOW())
)