UPDATE
cscart_lock_keys
SET
expiry_at = UNIX_TIMESTAMP(NOW()) + 30,
token = 'np0dzLgaMgDgr+N4Vp4+BUdwKY7MdcyK3qcW+1lqe4g='
WHERE
key_id = '93e460976fa9fca293991751116079d360801806d9ec902c3bb132f51483e5a4'
AND (
token = 'np0dzLgaMgDgr+N4Vp4+BUdwKY7MdcyK3qcW+1lqe4g='
OR expiry_at <= UNIX_TIMESTAMP(NOW())
)