UPDATE
cscart_lock_keys
SET
expiry_at = UNIX_TIMESTAMP(NOW()) + 30,
token = '9qSbMNS9Lx26AbU6jLnOPXASrZaBM+MuR67hRJyh/vs='
WHERE
key_id = '8bbfc37d60114ea5c33f0843693aad1f53a728be69335642afff3546ed0dace2'
AND (
token = '9qSbMNS9Lx26AbU6jLnOPXASrZaBM+MuR67hRJyh/vs='
OR expiry_at <= UNIX_TIMESTAMP(NOW())
)