UPDATE
cscart_lock_keys
SET
expiry_at = UNIX_TIMESTAMP(NOW()) + 30,
token = 'LVA49pJPyWAusUCrlaBbCF8ZUnocR+c8L0lJGd+bI4Y='
WHERE
key_id = '1613f605a672cab291b42e3bb14dc8a56f256281ac4d965d12c2ec9c82bb1d51'
AND (
token = 'LVA49pJPyWAusUCrlaBbCF8ZUnocR+c8L0lJGd+bI4Y='
OR expiry_at <= UNIX_TIMESTAMP(NOW())
)