UPDATE
cscart_lock_keys
SET
expiry_at = UNIX_TIMESTAMP(NOW()) + 30,
token = 'Mtjuhu/yCrXBb2/bZyuxh0UE/Ry+OughNYw9ccFmrDQ='
WHERE
key_id = '44df50b43fc48f90f97e7a6aca01b5a835845f5fe3c90df86cdd5df85d3c22ee'
AND (
token = 'Mtjuhu/yCrXBb2/bZyuxh0UE/Ry+OughNYw9ccFmrDQ='
OR expiry_at <= UNIX_TIMESTAMP(NOW())
)