UPDATE
cscart_lock_keys
SET
expiry_at = UNIX_TIMESTAMP(NOW()) + 30,
token = 'fbivIoP7QnVNlp1Y0uh14FxiTz3djDfqjbdEw4XLu50='
WHERE
key_id = '453662133229afa96b00e360432bf2156e8a1d30024d041ea76dbef97a57fe3c'
AND (
token = 'fbivIoP7QnVNlp1Y0uh14FxiTz3djDfqjbdEw4XLu50='
OR expiry_at <= UNIX_TIMESTAMP(NOW())
)