UPDATE
cscart_lock_keys
SET
expiry_at = UNIX_TIMESTAMP(NOW()) + 30,
token = 'Imni4sBnJ259pRZ5KFUBYdVgdJcOWwOJ/5Io5KwhU58='
WHERE
key_id = '5441e5e0bddea7cb8d75db19dcf04968181449852f83dde3fcee5b60ad18d793'
AND (
token = 'Imni4sBnJ259pRZ5KFUBYdVgdJcOWwOJ/5Io5KwhU58='
OR expiry_at <= UNIX_TIMESTAMP(NOW())
)