UPDATE
cscart_lock_keys
SET
expiry_at = UNIX_TIMESTAMP(NOW()) + 30,
token = 'IrnyIzd8YsrAS6qV7ML2k/ldoAC81n9zQ+HRNYGvXPQ='
WHERE
key_id = '545cb5a375cecadab0da1ae692b4d26714abb65744e02fe00dae191ece5cba03'
AND (
token = 'IrnyIzd8YsrAS6qV7ML2k/ldoAC81n9zQ+HRNYGvXPQ='
OR expiry_at <= UNIX_TIMESTAMP(NOW())
)